class A {


    public A() {

        func();
    }

    public void func() {

        System.out.println("func");
    }
}

class B extends A {

    public int num = 1;

    @Override
    public void func() {
        System.out.println("func " + num);

    }
}

public class Demo3 {

    public static void main(String[] args) {
        B b = new B();
    }
}
